To show line numbers in the code editor and code view, enable the preference General - Editors - Text Editors - Show line numbers. You can toggle this preference by right-clicking in the margin of the Code Editor or Code View and choose "Show Line Numbers". This preference applies to all Eclipse text editors.